//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { GroupTag, GroupTagResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooGroupTagList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<GroupTagResponse>(`/uctoo/group_tag/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooGroupTag = async (id: string) => {
  return requestClient.get<GroupTag>(`/uctoo/group_tag/${id}`);
};

export const adductooGroupTag = async (data: Partial<GroupTag>) => {
  return requestClient.post<GroupTag>('/uctoo/group_tag/add', data);
};

export const edituctooGroupTag = async (data: Partial<GroupTag>) => {
  return requestClient.post<GroupTag>('/uctoo/group_tag/edit', data);
};

export const deleteuctooGroupTag = async (id: string) => {
  return requestClient.post<any>('/uctoo/group_tag/del', { id });
};
